-- GENERATED SPELL FOR [Soulless Ghoul] --


function spell0_1794(pUnit, Event) --@Frailty,Self--
pUnit:FullCastSpellOnTarget(12530,pUnit)
pUnit:RegisterEvent('Sorts_1794', 655, 1)
end

function spell1_1794(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(14033,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1794', 3000, 1)
end

function spell2_1794(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(14887,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1794', 3000, 1)
end

function Sorts_1794(pUnit, Event)
local choix_sorts_1794 = math.random(0, 2)
if choix_sorts_1794 == 0 then
pUnit:RegisterEvent('spell0_1794', 1, 1)
end
if choix_sorts_1794 == 1 then
pUnit:RegisterEvent('spell1_1794', 1, 1)
end
if choix_sorts_1794 == 2 then
pUnit:RegisterEvent('spell2_1794', 1, 1)
end
end

function mob1794_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1794', math.random(1500, 3000), 1)
end

function mob1794_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1794_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1794_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1794, 1, 'mob1794_Action')
RegisterUnitEvent(1794, 2, 'mob1794_Leave')
RegisterUnitEvent(1794, 3, 'mob1794_Kill')
RegisterUnitEvent(1794, 4, 'mob1794_Die')
